<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.ArrayList"%>
<%@ page import=" java.util.List"%>
<%@ page import=" com.demo.entity.Products"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>系统管理-商品管理</title>
</head>
<body>
<center>
    <fieldset>
        <legend style="color: #00f" > <h3 >商品管理</h3></legend>
        <table border="1">
            <tr>
                <th>商品号</th>
                <th>商品名</th>
                <th>价格</th>
                <th>库存量</th>
                <th>类别</th>
                <th>详细信息</th>
                <th colspan="2">CURD</th>
            </tr>
            <%
                List<Products> productsList = (ArrayList<Products>) session.getAttribute("productsInfoList");
                for (Products productsInfoList : productsList) {
            %>
            <tr>
                <th><%=productsInfoList.getProduct_id()%></th>
                <th><%=productsInfoList.getName()%></th>
                <th><%=productsInfoList.getPrice()%></th>
                <th><%=productsInfoList.getPnum()%></th>
                <th><%=productsInfoList.getCategory()%></th>
                <th><%=productsInfoList.getDescription()%></th>
                <th><a href="updateOneProduct/<%=productsInfoList.getProduct_id()%>">修改</a></th>
                <th><a href="deleteProductInfo/<%=productsInfoList.getProduct_id()%> ">删除</a></th>
            </tr>
            <%
                }
            %>
              <tr><th colspan="8" align="center"><a href="/WebStoreSSM/views/addProduct.jsp">增加</a>
                                                                                 <a href="/WebStoreSSM/controller/productsInfo_action">更新</a>
                                                                                 <a href="/WebStoreSSM/views/pageAdmin.jsp">返回系统管理</a></th></tr>
        </table>
    </fieldset>
</center>
</body>
</html>